Skip to content

[codex-analytics] report cached input tokens for v2 compaction - #27103

Merged
rhan-oai merged 1 commit into
mainfrom
rhan/compaction-cache-analytics
Jun 11, 2026
Merged

[codex-analytics] report cached input tokens for v2 compaction#27103
rhan-oai merged 1 commit into
mainfrom
rhan/compaction-cache-analytics

Conversation

@rhan-oai

@rhan-oai rhan-oai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add nullable cached_input_tokens to the compaction analytics event
  • populate it from response usage for compaction v2
  • leave it null for other compaction implementations

This adds visibility into prompt-cache usage for v2 compaction without changing compaction behavior.

Testing

  • just test -p codex-analytics
  • just test -p codex-core collect_compaction_output_accepts_additional_output_items

@rhan-oai
rhan-oai marked this pull request as ready for review June 10, 2026 16:29
@rhan-oai
rhan-oai requested a review from a team as a code owner June 10, 2026 16:29
@rhan-oai
rhan-oai merged commit 383708e into main Jun 11, 2026
31 checks passed
@rhan-oai
rhan-oai deleted the rhan/compaction-cache-analytics branch June 11, 2026 05:47
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants